let $ = layui.jquery;
let jQuery=$;
let SettingData = {};//配置文件参数
let SeleteData = {};//筛选参数
let current =1;
let raw = '';//排序
let InitData={};
let table_config = {
    "header": {
        "button": [
            {
                "title": "新增",
                "icon": "",
                "btn_class": "btn_theme_1",
                "is_drop": 2,
                "type": "window",
                "url": "/admin/tenant/add/",
                "where": "",
                "width": 700,
                "height": 0,
                "node": "admin:tenant:add"
            }
        ],
        "tab": [],
        "search": {
            "datetime": [
                {
                    "value": "expire_time",
                    "label": "过期时间"
                }
            ],
            "like": "租户名称|联系人|联系手机"
        },
        "sum": []
    },
    "left": {
        "status": 2,
        "title": null,
        "options_id": null,
        "key_field": "value",
        "show_field": "label",
        "field": null,
        "type": 1,
        "url": {
            "title": "",
            "list": "/common/options/leftlists/?num=",
            "add": "",
            "edit": "",
            "delete": "",
            "width": "",
            "height": ""
        }
    },
    "source": "zuhu_product",
    "table": {
        "button": [
            {
                "title": "修改",
                "icon": "",
                "btn_class": "btn_theme_1",
                "is_drop": 2,
                "type": "window",
                "url": "/admin/tenant/edit/?id={d.id}",
                "where": "",
                "width": 700,
                "height": 0,
                "node": "admin:tenant:edit"
            },
            {
                "title": "删除",
                "icon": "",
                "btn_class": "btn_theme_2",
                "is_drop": 2,
                "type": "ajax",
                "url": "/admin/tenant/delete/?id={d.id}",
                "where": "",
                "width": 0,
                "height": 0,
                "node": "admin:tenant:delete"
            },
            {
                "title": "角色",
                "icon": "",
                "btn_class": "btn_theme_0",
                "is_drop": 1,
                "type": "window",
                "url": "/admin/role/index/?tenant_id={d.id}",
                "where": "",
                "width": 0,
                "height": 0,
                "node": "admin:role:index"
            },
            {
                "title": "组织",
                "icon": "",
                "btn_class": "btn_theme_0",
                "is_drop": 1,
                "type": "window",
                "url": "/admin/department/index/?tenant_id={d.id}",
                "where": "",
                "width": 0,
                "height": 0,
                "node": "admin:department:index"
            },
            {
                "title": "用户",
                "icon": "",
                "btn_class": "btn_theme_0",
                "is_drop": 1,
                "type": "window",
                "url": "/admin/user/index/?tenant_id={d.id}",
                "where": "",
                "width": 0,
                "height": 0,
                "node": "admin:user:index"
            }
        ],
        "style": 1,
        "parent_id": "parent_id",
        "parent_name": "title",
        "limit": 30,
        "tab_sum": "",
        "page": true,
        "elem": "datatable",
        "height": "full-85",
        "update": "/admin/tenant/update_field/",
        "url": "/admin/tenant/index/",
        "cols": [
            {
                "id": "1721300093_22_1",
                "field": "name",
                "title": "租户名称"
            },
            {
                "id": "1721301185_22_10",
                "field": "product_ids",
                "title": "租户产品包",
                "options": "zuhu_product"
            },
            {
                "id": "1721300095_22_3",
                "field": "account_count",
                "title": "账号数量"
            },
            {
                "id": "1721300095_22_2",
                "field": "expire_time",
                "title": "过期时间",
                "width": "160",
                "minWidth": "160"
            },
            {
                "id": "1721300096_22_4",
                "field": "status",
                "title": "租户状态",
                "update": "switch"
            },
            {
                "id": "1721300098_22_5",
                "field": "website",
                "title": "绑定域名"
            },
            {
                "id": "1721300098_22_6",
                "field": "contact_name",
                "title": "联系人"
            },
            {
                "id": "1721300099_22_7",
                "field": "contact_mobile",
                "title": "联系手机"
            },
            {
                "id": "1721300104_22_9",
                "field": "create_id",
                "title": "新增人"
            },
            {
                "id": "1721300101_22_8",
                "field": "create_time",
                "title": "新增时间",
                "width": "160",
                "minWidth": "160"
            }
        ]
    }
};
let form_config = {
    detail:'/admin/tenant/detail/',
    add:'/admin/tenant/add/',
    edit:'/admin/tenant/edit/',
    data:{
    "name": "",
    "expire_time": "",
    "account_count": "",
    "status": "1",
    "product_ids": "",
    "contact_name": "",
    "contact_mobile": "",
    "website": ""
},
    label_width:'',
    form_label:'form_right',
    onclick:[],
};
